<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>computed</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>

</head>
<body>
<div id="app">
    <h2>{{new Date(birthday).getFullYear()}}</h2>
    <h2>{{birth}}</h2>
</div>
<script type="text/javascript">
    var app = new Vue({
        el: "#app",
        data: {
            birthday: 1616566607104
        },
        computed:{
            birth()
            {
                const day = new Date(this.birthday)
                return day.getFullYear() + "-" + day.getUTCMonth() + "-" + day.getUTCDay();
            }
        }
    })
</script>
</body>
</html>